package com.msb;

/**
 * @author lidexin
 * @create 2021-09-19 13:46
 */
public class T2 implements Runnable {
    private int count = 10;
    public /*synchronized */ void run() {
        count --;
        System.out.println(Thread.currentThread().getName() + "count = " + count);
    }

    public static void main(String[] args) {
        T2 t = new T2();
        for (int i = 0; i < 5; i++) {
            new Thread(t,"THREAD" + i).start();
        }
    }
}
